package org.itt;

import org.itt.af.SourceFactory;
import org.itt.ap.Reader;
import org.itt.ap.Source;
import org.itt.ap.Writer;

public class Client {
        SourceFactory sourceFactory;

        public void selectSource(SourceFactory sourceFactory) {
                this.sourceFactory = sourceFactory;
        }

        public void runCSost() {
                Source source = sourceFactory.createSource();
                Reader reader = sourceFactory.createReader();
                Writer writer = sourceFactory.createWriter();
                reader.parse(source);
                writer.index(source);
        }
}